#ifndef GLSERVER_H
#define GLSERVER_H

#include <QVector4D>
#include <GL/gl.h>
#include <QVector>
#include <QFile>
#include <QTextStream>
#include "AreaTest/ServerDefine.h"

class GLServer
{
public:
    enum ColorVector {
        LINE_COLOR
    };

    static GLServer *getInstance();
    void destroy();

    void setColor(ColorVector type, QVector4D color);
    QVector4D getColor(ColorVector type);
    int getBackVertexSize();
    GLfloat *getBackVertexData();
    int *getScanDataFromFile();
    GLfloat *getScanVertexData();

private:
    static GLServer *instance;
    GLServer();
    GLServer(const GLServer &origin);
    ~GLServer();

    QVector4D lineColor;
    QVector<GLfloat> backgroundVertex;
};

#endif // GLSERVER_H
